@extends('default.mobile.layouts.indexPublic')
@section('title'){{ Site::get('area_name').'职场资讯_'.Site::get('area_name').'人力资源政策劳动法苑-'.Site::get('webname') }} @endsection
{{--首页css--}}
@section('headcss')
	@parent
	<link rel="stylesheet" href="{{asset('/default/css/mobile/index/news.css')}}">
@endsection
{{--头部标签--}}
@section('tag','资讯列表')
{{--主体内容--}}
@section('content')
<div class="news_menu">
	<ul>
		@foreach($secondClass as $k => $v)
			<li @if(!empty($class) && $v->id == $class )class="on" @endif><a href="{{url('mobile/news?class='.$v->id)}}">{{ $v->defectsname }}</a></li>
		@endforeach
	</ul>
</div>

<div class="news_list">
	@if(count($latelyNews) > 0)
		@foreach($latelyNews as $v)
			@if( $v->imgUrl != '' )
				<div class="news_item">
					<a href="{{url('mobile/newsinfo_'.$v->id.'.html')}}">
						<span class="newsImg"><img src="{{asset($v->imgUrl)}}" alt=""></span>
						<dl>
							<dt @if($v->style != '') style="color: {{ $v->style }}" @endif>{{ str_limit($v->title,26) }}</dt>
							<dd><time>{{ substr($v->updated_at,0,10) }}</time><span class="reading">阅读量：{{ $v->readnum }}</span></dd>
							<dd><p>{!! str_limit($v->content,28)!!}</p></dd>
						</dl>
					</a>
				</div>
			@else
				<div class="news_item">
					<a href="{{url('mobile/newsinfo_'.$v->id.'.html')}}">
						<dl class="null_img">
							<dt @if($v->style != '') style="color: {{ $v->style }}" @endif>{{ str_limit($v->title,30) }}</dt>
							<dd><time>{{ substr($v->updated_at,0,10) }}</time><span class="reading">阅读量：{{ $v->readnum }}</span></dd>
							<dd><p>{!! str_limit($v->content,100) !!}</p></dd>
						</dl>
					</a>
				</div>
			@endif
		@endforeach
	@else
		<div class="list_empty">
			<span class="norecord"></span>
			<span class="sorry">抱歉，没有找到符合您条件记录！</span>
		</div>
	@endif
</div>
<!-- B分页 -->
<div class="page">
	@if($latelyNews->currentPage() <= 1 )
		<a class="btn_gary previous">上一页</a>
	@else
		<a href="{{$latelyNews->previousPageUrl()}}" class="previous">上一页</a>
	@endif
		<span><em>{{ $latelyNews->total()== 0 ? 1 : $latelyNews->currentPage()}}</em>/{{ $latelyNews->lastPage() == 0 ? 1 : $latelyNews->lastPage() }}</span>
		@if($latelyNews->currentPage() == $latelyNews->lastPage() || $latelyNews->lastPage() == 0 )
		<a class="btn_gary next">下一页</a>
	@else
		<a href="{{$latelyNews->nextPageUrl()}}" class="next">下一页</a>
	@endif
</div>
<!-- E分页 -->
@endsection
@section('footerjs')
	@parent
@endsection